package com.example.baseapp.service.impl;

import com.example.baseapp.entity.Category;
import com.example.baseapp.repository.CategoryRepository;
import com.example.baseapp.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {
    
    @Autowired
    private CategoryRepository categoryRepository;
    
    @Override
    public List<Category> getAllCategories() {
        return categoryRepository.findAll();
    }
    
    @Override
    public List<Category> getAllActiveCategories() {
        return categoryRepository.findAllActiveOrderBySortOrder();
    }
} 